
package com.sskj.jkzx.repository;

import org.springframework.data.jpa.repository.Query;

import com.sskj.core.repository.GenericRepository;
import com.sskj.jkzx.domain.entity.quantity.SgxkEngQuantity;

public interface SgxkEngQuantityRepository
		extends GenericRepository<SgxkEngQuantity, String> {

	@Query(value = "select * from jkzx_sgxk_eng_quantity t where t.type='1' order by t.created_time,t.tj_year desc limit 1",
			nativeQuery = true)
	SgxkEngQuantity findZjLastOne();

	@Query(value = "select * from jkzx_sgxk_eng_quantity t where t.type='0' order by t.created_time,t.tj_year desc limit 1",
			nativeQuery = true)
	SgxkEngQuantity findJgLastOne();
}
